<h2>{{ v.project.name }}</h2>
<form action="projectEdit" method="post">
  <input type="hidden" name="key" value="{{ v.project.key }}">
  <table>
    <tr>
      <th><label for="name">Name</label></th><td><input type="text" class="first" name="name" id="name" value="{{ v.project.name }}"></td>
    <tr>
    <tr>
      <th><label for="abbr">Abbr</label></th><td><input type="text" name="abbr" id="abbr" value="{{ v.project.abbr }}"></td>
    <tr>
    <tr>
      <th><label for="price">Base Price</label></th><td><input type="text" name="price" id="price" value="{{ v.project.price }}"></td>
    <tr>
    <tr>
      <th><label for="additionalWeekPrice">Additional Weeks Price</label></th><td><input type="text" name="additionalWeekPrice" id="additionalWeekPrice" value="{{ v.project.additionalWeekPrice }}"></td>
    <tr>
    <tr>
      <th><label for="minimum_duration">Minimum Duration</label></th><td><input type="text" name="minimum_duration" id="minimum_duration" value="{{ v.project.minimum_duration }}"></td>
    <tr>
  </table>
  <label for="comment">Comments</label><br/>
  <textarea name="comment" id="comment">{{ v.project.comment }}</textarea><br/>
  <input type="submit" value="Save">
</form>
{% if v.project %}
<h2>Sites</h2>
<a href='/siteForm?pkey={{ v.project.key }}' accesskey="a">Add</a>
<table>
  <thead>
    <tr>
      <th>Site</th><th>Abbr</th><th>Country</th><th>Capacity</th><th>Actions</th>
    </tr>
  </thead>
  <tbody>
    {% for site in v.project.sites %}

    <tr {% ifchanged site.country %}class='endrow'{% endifchanged %}>
      <td>{{ site.name }}</td><td>{{ site.abbr }}</td><td>{{ site.country }}</td><td>{{ site.capacity }}</td><td><a href='/siteForm?skey={{ site.key }}&pkey={{ v.project.key }}'>Edit</a> | <a class="delete site" href='/siteDelete?skey={{ site.key }}&pkey={{ v.project.key }}'>Delete</a></td>
    </tr>
    {% endfor %}
  </tbody>
</table>
{% endif %}

